﻿using System;
using System.Collections.Generic;
using System.Text;

namespace UDS.Management.Data
{
    /// <summary>
    /// Represents a mdf or ldf file
    /// </summary>
    public class DatabaseFile
    {
        private string _serverName;
        private string _LogicalName;
        private string _fullPath;
        private string _state;

        public string ServerName
        {
            get { return _serverName; }
            private set { _serverName = value; }
        }

        public string LogicalName
        {
            get { return _LogicalName; }
            private set { _LogicalName = value; }
        }

        public string FullPath
        {
            get { return _fullPath; }
            private set { _fullPath = value; }
        }

        public string State
        {
            get { return _state; }
            private set { _state = value; }
        }

        public DatabaseFile(string serverName, string logicalName, string fullPath, string state)
        {
            #region Check Parameters
            if (String.IsNullOrEmpty(logicalName))
            {
                throw new ArgumentNullException(logicalName);
            }
            if (String.IsNullOrEmpty(fullPath))
            {
                throw new ArgumentNullException(fullPath);
            }
            if (String.IsNullOrEmpty(logicalName))
            {
                throw new ArgumentNullException(state);
            }
            #endregion

            ServerName  = serverName;
            LogicalName = logicalName;
            FullPath    = fullPath;
            State       = state;
        }
    }
}
